#ifndef __SHADER_H__
#define __SHADER_H__

#include "../Header.h"
#include "Resource.h"

class Shader : public Resource
{
private:
	virtual void Load(){}
protected:
	GLuint m_VertexShader, m_FragmentShader;
public:
	//Program handle
	GLuint m_Program;

	//Vertex info
	GLuint m_Pos;
	GLuint m_UV;
	GLuint m_Normal;
	GLuint m_BiNormal;
	GLuint m_Tangent;
	GLuint m_Color;

	//Matrix
	GLuint m_WorldMatrix;
	GLuint m_WVPMatrix;

	//Camera
	GLuint m_CameraPos;

	//Lighting
	GLuint m_LightPos;
	GLuint m_LightDirection;

	//Texture sampler
	GLuint m_sampler[10];
protected:
	GLuint LoadShader(GLenum, char*);
	GLuint LoadProgram(GLuint vertexShader, GLuint fragmentShader);
public:
	Shader();
	~Shader();
	__int32_ Init(char* vsh, char* fsh);
};

#endif